feat(linear): add native multi-output matrix support to LinearRegression - #433
Conversation
|
thank you. i will look into this asap |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #433 +/- ##
================================================
+ Coverage 45.59% 63.85% +18.25%
================================================
Files 93 95 +2
Lines 8034 8166 +132
================================================
+ Hits 3663 5214 +1551
+ Misses 4371 2952 -1419 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
🔴 Breaking API Changes
🟡 Design / Correctness
🟡 Test Coverage Gaps
|
f5069ea to
2635d3c
Compare
|
Thanks for the detailed feedback! I have updated the branch with the requested fixes and adjustments:
Please let me know if any further tweaks are needed! |
✅ Resolved from Previous Round
🔴 Remaining: Struct-Level
|
Brings in review fixes for multi-output LinearRegression (#433): restored API docs, tiled-intercept predict_matrix, multi-output serde round-trip test, SVD-vs-QR agreement check, CHANGELOG entry, and patch bump 0.6.6 -> 0.6.7.
* feat(linear): add native multi-output matrix support to LinearRegression * style: apply rustfmt formatting to linear regression tests * fix(linear): resolve reviewer feedback for multi-output regression * feat(linear): add native multi-output matrix support to LinearRegression (#433) * feat(linear): add native multi-output matrix support to LinearRegression * style: apply rustfmt formatting to linear regression tests * fix(linear): resolve reviewer feedback for multi-output regression * fix(linear): address multi-output regression review feedback + bump patch 0.6.6 -> 0.6.7 - Restore parameter docs on fit_matrix/predict_matrix/fit/predict - Replace per-element predict_matrix loop with tiled intercept + add_mut - Revert mangled Longley URL comment and stray blank line - Add multi-output serde round-trip test and SVD-vs-QR agreement check - Verify predictions reproduce exact linear targets in correctness test - Document breaking intercept type change in CHANGELOG.md --------- Co-authored-by: GEORGE OLTEANU <marketintelligentia@gmail.com>
* feat(linear): add native multi-output matrix support to LinearRegression * style: apply rustfmt formatting to linear regression tests * fix(linear): resolve reviewer feedback for multi-output regression * feat(linear): add native multi-output matrix support to LinearRegression (#433) * feat(linear): add native multi-output matrix support to LinearRegression * style: apply rustfmt formatting to linear regression tests * fix(linear): resolve reviewer feedback for multi-output regression * fix(linear): address multi-output regression review feedback + bump patch 0.6.6 -> 0.6.7 - Restore parameter docs on fit_matrix/predict_matrix/fit/predict - Replace per-element predict_matrix loop with tiled intercept + add_mut - Revert mangled Longley URL comment and stray blank line - Add multi-output serde round-trip test and SVD-vs-QR agreement check - Verify predictions reproduce exact linear targets in correctness test - Document breaking intercept type change in CHANGELOG.md * fix: reject underdetermined LinearRegression systems instead of panicking (#435) (#436) - LinearRegression::fit_matrix returns Err(Failed::fit(...)) when n_features + 1 > n_samples, for both the SVD (default) and QR solvers - svd_solve / svd_solve_mut and SVD::solve return Err(FailedError::SolutionFailed) for wide systems instead of writing the solution past b's bounds - qr_solve_mut returns Err(Failed) for rank-deficient systems instead of panicking with "Matrix is rank deficient." - regression tests: both solver panics reproduced, boundary case n_samples == n_features + 1 still fits with known-answer assertions - AGENTS.md: document zero-copy iterator(...) access and the numbers/ abstraction conventions - bump patch 0.6.7 -> 0.6.8 --------- Co-authored-by: GEORGE OLTEANU <marketintelligentia@gmail.com>
Fixes #432
Checklist
Current behaviour
LinearRegressionstruct and related generic methods contain unused type parameters (TX), triggering compiler warning/errorE0392.predict_matrixperforms operations directly on reference types (&TX + &TX), resulting in compiler errorE0369.New expected behaviour
PhantomDatamarker fields for unused type parameters to satisfyE0392without breaking API compatibility.predict_matrixby dereferencing values (*current + *bias), resolvingE0369.cargo clippywarnings and full test coverage for multi-output matrix operations.Change logs
Added
multi_output_ols_fit_predictverifying multi-output matrix fit and prediction operations.Changed
PhantomDatafields toLinearRegressionstruct definition and initializations.predict_matrixelement addition logic to use dereferenced scalar values.